yum remove docker*
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --disable docker-ce-edge
yum-config-manager --disable docker-ce-test
yum makecache fast
yum install -y --setopt=obsoletes=0 docker-ce-17.12.1.ce-1.el7.centos.x86_64
systemctl enable docker && systemctl start docker
docker run -i --rm hello-world
#setting docker daemon.json
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn","https://hub-mirror.c.163.com","https://registry.docker-cn.com","https://mwhuxmxw.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
docker info
docker run -i --rm hello-world